From 1b5b2a3089eba198589d11ad5f1e28c86dbf3c1e Mon Sep 17 00:00:00 2001 From: robertlipe Date: Wed, 6 Feb 2013 06:55:28 +0000 Subject: [PATCH] Move url_link and utf_string to be more C++-ish. --- gpsbabel/defs.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index 3d75d3e7e..5883400e7 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -262,10 +262,15 @@ typedef enum { gc_small } geocache_container; -typedef struct { - int is_html; +class utf_string{ + public: + utf_string() : + is_html(false), + utfstring(NULL) + {}; + bool is_html; char* utfstring; -} utf_string; +}; typedef struct { int id; /* The decimal cache number */ @@ -346,11 +351,17 @@ fs_xml* fs_xml_alloc(long type); /* * Structures and functions for multiple URLs per waypoint. */ -typedef struct url_link { +class url_link { + public: + url_link() : + url_next(NULL), + url(NULL), + url_link_text(NULL) + {} ; struct url_link* url_next; char* url; char* url_link_text; -} url_link; +}; /* * Misc bitfields inside struct waypoint; -- 2.30.2